//
//  UINavigationController+YNBase.m
//  CarService
//
//  Created by fengyn on 15/2/3.
//  Copyright (c) 2015年 lexingsoft. All rights reserved.
//

#import "UINavigationController+YNBase.h"

@implementation UINavigationController(YNBase)
@dynamic shadowImage;
- (UIStatusBarStyle)preferredStatusBarStyle{
    UIViewController *viewController = self.viewControllers.lastObject;
    return [viewController preferredStatusBarStyle];
}

-(void)viewDidLoad
{
    [super viewDidLoad];
    [self.navigationBar setTranslucent:NO];
    [self.navigationBar setBarTintColor:[ColorManager colorWithNavigationBarBackground]];
    [self.navigationBar setTintColor:[ColorManager colorWithNavigationBar]];
    [self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[ColorManager colorWithNavigationBar]}];
    [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15]} forState:UIControlStateNormal];
}

-(void)setNavigationBarBottomLineHide:(BOOL)isHide
{
    if (isHide) {
        self.navigationBar.shadowImage=[[UIImage alloc] init];
    }else
    {
        self.navigationBar.shadowImage=nil;
    }
    
}

@end
